home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / misc / thesource7.lha / Articles / StereoProjection.guide (.txt) < prev    next >
Amigaguide Document  |  1994-06-24  |  6KB  |  105 lines

  1. @deatabase StereoProjection
  2. @node main
  3.     Stereoscopic projection is the technique of creating two different
  4. projectsion of the same scene such that one is viewed with the left
  5. eye, and the other is viewed with the right eye.  This technology is far
  6. from new.  It has been used for more that a century to create the
  7. illusion of 3D from two 2D pictures.  It has been used in everything
  8. from children's toys to horror films.  The question is often brought up
  9. in the many graphics programming related Usnet news groups, "How does it
  10. work?"  I will make an attempt to answer this question in a way that
  11. will be both clear and useful.
  12. ===================
  13. @{b}Physics of the Eyes@{ub}
  14. ===================
  15.     Nearly every human being is equiped with two eyes.  They are
  16. generally placed about 650 mm apart.  Each eye, therefore, will have a
  17. slightly different view of its surroundings.  The brain uses this
  18. difference to gauge distance.  For example, @{ "figure 1" system "display Articles/Stereo/figure1.ilbm" } shows that an
  19. individual object is at a different location in each eye's field of
  20. vision.  While it is not totally understood how the brain does it, it is
  21. known that the difference between the two images is used to gauge depth.
  22. It is also know that a stereo pair does more to give the impression of
  23. depth than color cueing and size cueing put together.
  24. =========================
  25. @{b}Mathematics of Projection@{ub}
  26. =========================
  27.     When a point is projected from 3D to 2D, it is essentially mapped
  28. from a truncated-pyramidal volume to a rectangular plane, as shown in
  29. @{ "figure 2a" system "display Articles/Stereo/figure2.ilbm" }.  The is done as though the camera points is at the crest of
  30. the pyramid.  This is simple enough to do, and can be done using two
  31. multiplies, two adds, and two divides.  To create a stereo display, a
  32. point needs to be projected twice:  once for each eye.  It the eyes are
  33. a distance X apart, then we can model them as being at a distance of X/2
  34. on either side of the original camera point, as shown in @{ "figure 2b" system "display Articles/Stereo/figure2.ilbm" }.  For
  35. a given point to be correctly projected for a given eye, it must first
  36. be transformed to that eye's view space.  Using simple geometry, it can
  37. be seen that this is done by moving the point towards the other eye by a
  38. distance of X/2.  @{"Figures 3a and 3b" system "display Articles/Stereo/figure3.ilbm" } show the left and right eye images
  39. generated using this method.
  40. ===============
  41. @{b}Stereo Hardware@{ub}
  42. ===============
  43.     Due to the fact that, when using stereoscopic projection, each eye
  44. needs to see a different image, some sort of special display hardware is
  45. needed.  Typical hardware ranges from the very cheep to the very very
  46. expensive.  At the low-end, there is either red-green or red-blue
  47. filtering.  This method involves covering one eye with a red filter and
  48. the other with either a green or a blue filter.  On the screen, both
  49. images are displayed, but the image for the  red-filter-eye is drawn in
  50. blue (or green), and the image for the blue-filter-eye is drawn in red. 
  51. This way the lenses will prevent either eye from seeing the other eye's
  52. image.  The method has a number of drawbacks, the most important one
  53. being that you can only use ``gray scale'' display.  That is, you get
  54. one hue that can vary intensities.
  55.     Another method, that is a bit more expensive and can be dangerous,
  56. is the use of shutter glasses.  Anyone who owned a Sega Master System in
  57. the 80's know what this device is.  The general pricipal behind it is
  58. that one eye is covered while the other eye's image is displayed.  The
  59. obvious advantages to this method are that all available colors of the
  60. display can be used and that each point doesn't need to be projected
  61. twice pre frame, as with the red-green filters.  While this may seem to
  62. be a very good sollution, it has its drawbacks.  First of all, some sort
  63. of device needs to be available to sync the shutters with the video
  64. display.  The SMS had one built in, but the Amiga does not, so some sort
  65. of adapter would need to be built.  Typical PC adapters connect to the
  66. sierial port.  The other problem is that there is some risk involved in
  67. having small pieces of plastic spinning at 60Hz less than four centemeters
  68. from a persons eyes!
  69.     The other popular device is by far the most expensive, costing from
  70. $500US to $10,000US, and most complex to interface.  This device is the
  71. head mounted display.  HMD's generally contain two small LCD monitors,
  72. on which each eye's image is displayed.  In this case some problems are
  73. solved, but others are introduced.  The biggest problems, other than the
  74. prohibitive cost, are that the resolution and color capabilities of
  75. LCD's are very low.  The display pitch of a typical LCD is so bad, that
  76. the user would be legally blind.  The other problem is that, even the
  77. lightest HMD's, are very heavy to have on one's head for an extended
  78. period of time.  The final issues are that two complete images need to
  79. be generated every frame and some sort of Zorro II or Zorro III card
  80. would be needed to interface a HMD to an Amiga.
  81. ===============
  82. @{b}How Sweet It Is@{ub}
  83. ===============
  84.     In spite of all its drawbacks, stereoscopic projection can new depth
  85. to nearly any 3D display.  The example program shows how effective
  86. stereoscopic projection can be, even with just the red-green glasses
  87. method.  When used with position tracking and a head mounted display,
  88. stereoscopic projection can be used to create a very realistic, very
  89. submersive, 3D environment.
  90.     In the directory @{b}:Source/Articles/StereoScopic@{ub} I have included a
  91. demonstration program, called @{b}stereo.lha@{ub}, that shows simple stereoscopic
  92. projection.  The file @{b}SegaGlasses.lha@{ub} describes how to interface
  93. a pair of Sega shutter glasses to a PC.  The other file, @{b}images.lha@{ub}
  94. contains several red-green images that show both how effective and how
  95. lacking this technique can be.
  96. @endnode
  97. @node Bibliography
  98. @{b}References@{ub}
  99. Aukstakalis S. and Blatner D. 1992. @{b}Silicon Mirage: The Art and
  100.     Science of Virtual Reality@{ub}, Peachpit Press, Inc., Berkeley,
  101.     CA.
  102. Foley, J. D. and A. van Dam, et. al. 1990. @{b}Computer Graphics
  103.     Principles and Practice@{ub}, Addicon-Wesley, Reading, MA.
  104. @endnode
  105.